<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      6.24.&nbsp;Procps-ng-3.3.6
    </title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="lfs" id="lfs-7.3">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 7.3
      </h4>
      <h3>
        Chapter&nbsp;6.&nbsp;Installing Basic System Software
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="psmisc.html" title="Psmisc-22.20">Prev</a>
          <p>
            Psmisc-22.20
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="e2fsprogs.html" title=
          "E2fsprogs-1.42.7">Next</a>
          <p>
            E2fsprogs-1.42.7
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
    <div class="wrap" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="ch-system-procps" name="ch-system-procps"></a>6.24.
        Procps-ng-3.3.6
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <p>
          The Procps-ng package contains programs for monitoring processes.
        </p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Approximate build time:</strong>
              <span class="segbody">0.2 SBU</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Required disk space:</strong>
              <span class="segbody">13 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          6.24.1. Installation of Procps-ng
        </h2>
        <p>
          Now prepare procps-ng for compilation:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr                           \
            --exec-prefix=                          \
            --libdir=/usr/lib                       \
            --docdir=/usr/share/doc/procps-ng-3.3.6 \
            --disable-static                        \
            --disable-skill                         \
            --disable-kill</kbd>
</pre>
        <div class="variablelist">
          <p class="title">
            <b>The meaning of the configure options:</b>
          </p>
          <dl>
            <dt>
              <span class="term"><em class=
              "parameter"><code>--disable-skill</code></em></span>
            </dt>
            <dd>
              <p>
                This switch disables the obsolete and unportable skill and
                snice commands.
              </p>
            </dd>
            <dt>
              <span class="term"><em class=
              "parameter"><code>--disable-kill</code></em></span>
            </dt>
            <dd>
              <p>
                This switch disables building the kill command that was
                installed in the util-linux package.
              </p>
            </dd>
          </dl>
        </div>
        <p>
          Compile the package:
        </p>
        <pre class="userinput">
<kbd class="command">make</kbd>
</pre>
        <p>
          The test suite needs some custom modifications for LFS. The
          <span class="command"><strong>which</strong></span> command is not
          available, the <span class="command"><strong>pmap</strong></span>
          test does not match a newline character in two tests, and the
          <span class="command"><strong>slabtop</strong></span> test may
          return more than 999,999 objects. To run the test suite, run the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">pushd testsuite
  sed -i -e 's|exec which sleep|exec echo /tools/bin/sleep|' \
         -e 's|999999|&amp;9|'                       config/unix.exp
  sed -i -e 's|pmap_initname\\\$|pmap_initname|' pmap.test/pmap.exp
  make site.exp
  DEJAGNU=global-conf.exp runtest
popd</kbd>
</pre>
        <p>
          Install the package:
        </p>
        <pre class="userinput">
<kbd class="command">make install</kbd>
</pre>
        <p>
          Finally move the library to a location that can be found if
          <code class="filename">/usr</code> is not mounted.
        </p>
        <pre class="userinput">
<kbd class="command">mv -v /usr/lib/libprocps.so.* /lib
ln -sfv ../../lib/libprocps.so.1.1.0 /usr/lib/libprocps.so</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          <a id="contents-procps" name="contents-procps"></a>6.24.2. Contents
          of Procps-ng
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed programs:</strong>
              <span class="segbody">free, pgrep, pkill, pmap, ps, pwdx,
              slabtop, sysctl, tload, top, uptime, vmstat, w, and,
              watch</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed library:</strong>
              <span class="segbody">libprocps.so</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0">
            <col align="left" valign="top" />
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="free" name="free"></a><span class=
                    "term"><span class=
                    "command"><strong>free</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reports the amount of free and used memory (both physical
                    and swap memory) in the system
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pgrep" name="pgrep"></a><span class=
                    "term"><span class=
                    "command"><strong>pgrep</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Looks up processes based on their name and other
                    attributes
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pkill" name="pkill"></a><span class=
                    "term"><span class=
                    "command"><strong>pkill</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Signals processes based on their name and other
                    attributes
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pmap" name="pmap"></a><span class=
                    "term"><span class=
                    "command"><strong>pmap</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reports the memory map of the given process
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="ps" name="ps"></a><span class="term"><span class=
                    "command"><strong>ps</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Lists the current running processes
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pwdx" name="pwdx"></a><span class=
                    "term"><span class=
                    "command"><strong>pwdx</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reports the current working directory of a process
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="slabtop" name="slabtop"></a><span class=
                    "term"><span class=
                    "command"><strong>slabtop</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Displays detailed kernel slap cache information in real
                    time
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="sysctl" name="sysctl"></a><span class=
                    "term"><span class=
                    "command"><strong>sysctl</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Modifies kernel parameters at run time
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="tload" name="tload"></a><span class=
                    "term"><span class=
                    "command"><strong>tload</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Prints a graph of the current system load average
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="top" name="top"></a><span class=
                    "term"><span class="command"><strong>top</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Displays a list of the most CPU intensive processes; it
                    provides an ongoing look at processor activity in real
                    time
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="uptime" name="uptime"></a><span class=
                    "term"><span class=
                    "command"><strong>uptime</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reports how long the system has been running, how many
                    users are logged on, and the system load averages
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="vmstat" name="vmstat"></a><span class=
                    "term"><span class=
                    "command"><strong>vmstat</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Reports virtual memory statistics, giving information
                    about processes, memory, paging, block Input/Output (IO),
                    traps, and CPU activity
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="w" name="w"></a><span class="term"><span class=
                    "command"><strong>w</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Shows which users are currently logged on, where, and
                    since when
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="watch" name="watch"></a><span class=
                    "term"><span class=
                    "command"><strong>watch</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    Runs a given command repeatedly, displaying the first
                    screen-full of its output; this allows a user to watch
                    the output change over time
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libprocps" name="libprocps"></a><span class=
                    "term"><code class="filename">libproc</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    Contains the functions used by most programs in this
                    package
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="psmisc.html" title="Psmisc-22.20">Prev</a>
          <p>
            Psmisc-22.20
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="e2fsprogs.html" title=
          "E2fsprogs-1.42.7">Next</a>
          <p>
            E2fsprogs-1.42.7
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter06.html" title=
          "Chapter&nbsp;6.&nbsp;Installing Basic System Software">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 7.3">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
